{extend name="./template/default/pc/pub/base.html" /}
{block name="seo"}
<title>漫画分类大全-{$site_name}</title>
{/block}
{block name="content"}
<section class="container-fluid bg-gray">
    <div class="container">
        <figure class="cat-filter">
            <dl class="cat-list" id="cates">
                <dt>题 材:</dt>
                <dd class="{$cate=='全部'?'active':''}" onclick="active(this)" data-val="全部"><a>全部</a></dd>
                {raccoon:cates name="cates" order="id desc"}
                <dd class="{$cate==$vo.tag_name?'active':''}" onclick="active(this)" data-val="{$vo.tag_name}"><a>{$vo.tag_name}</a></dd>
                {/raccoon:cates}
            </dl>
            <div class="field-wrap">
                <dl class="field-list" id="areas">
                    <dt>地 区:</dt>
                    <dd class="{$area==-1?'active':''}" onclick="active(this)" data-val="-1"><a>全部</a></dd>
                    {raccoon:areas name="areas" order="id desc"}
                    <dd class="{$area==$vo.id?'active':''}" onclick="active(this)" data-val="{$vo.id}"><a>{$vo.area_name}</a></dd>
                    {/raccoon:areas}
                </dl>
                <dl class="field-list" id="end">
                    <dt>进 度:</dt>
                    <dd class="{$end==-1?'active':''}" onclick="active(this)" data-val="-1"><a>全部</a></dd>
                    <dd class="{$end=='2'?'active':''}" onclick="active(this)" data-val="2"><a>连载</a></dd>
                    <dd class="{$end=='1'?'active':''}" onclick="active(this)" data-val="1"><a>完结</a></dd>
                </dl>
            </div>
        </figure>
    </div>
</section>
<script>
    function active(item) {
        $(item).siblings().removeClass('active');
        $(item).addClass('active');
        var cate = $('#cates dd.active').attr('data-val');
        var area = $('#areas dd.active').attr('data-val');
        var end = $('#end dd.active').attr('data-val');

        location.href = '/{$booklist_act}?cate='+cate+'&area='+area+'&end='+end;
    }
</script>
<section class="box container pb40 overflow-Show" style="min-height:400px;">
    <div class="box-body">
        <ul class="mh-list col7">
            {raccoon:pagedbooks name="pagedBooks" pagesize="28" order="last_time desc"
            where="tags like '%$cate%' and area_id='$area' and end='$end'"}
            <li>
                <div class="mh-item">
                    <a href="/{$book_ctrl}/{$vo.param}" title="{$vo.book_name}">
                        <p class="mh-cover" style="background-image: url({$vo.cover_url|get_img_url|default=''})"></p>
                    </a>
                    <div class="mh-item-detali">
                        <h2 class="title">
                            <a href="/{$book_ctrl}/{$vo.param}" title="{$vo.book_name}" style="white-space: nowrap; overflow: hidden; text-overflow: ellipsis;">
                                {$vo.book_name}
                            </a>
                        </h2>
                        <p class="zl">
                            <span>评分:</span>
                            <span class="mh-star-line star-5"></span>
                        </p>
                        <p class="chapter" style="width: 181px;">
                            {$vo.summary}
                        </p>
                    </div>
                </div>
            </li>
            {/raccoon:pagedbooks}
        </ul>
    </div>

    <footer>
        <div class="page-pagination mt20">
            <ul>
                <div class="pagination">
                    {if $page.last_page > 1}
                    {if $page.current_page == 1}
                    <li><a>&lt;</a></li>
                    {else/}
                    <li><a id="prevPage" href="/{$booklist_act}?page={$page.current_page-1}{$param}" title="上一页">&lt;</a></li>
                    {/if}

                    {for start="1" end="$page.last_page + 1"}
                    {if $i == $page.current_page }
                    <li><a href="/{$booklist_act}?page={$i}{$param}" class="active">{$i}</a></li>
                    {elseif ($i > $page.current_page - 4 && $i < $page.current_page + 5)/}
                    <li><a href="/{$booklist_act}?page={$i}{$param}" title="第{$i}页">{$i}</a></li>
                    {/if}
                    {/for}

                    {if $page.current_page == $page.last_page}
                    <li><a>&gt;</a></li>
                    {else/}
                    <li><a id="nextPage" href="/{$booklist_act}?page={$page.current_page+1}{$param}" title="下一页">&gt;</a></li>
                    {/if}
                    {/if}
                </div>
            </ul>
        </div>
    </footer>
</section>
<ul class="index-right-float bottom">
    <li><a href="javascript:slide();" class="index-right-float-top"></a></li>
</ul>
{/block}